'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    const {
      INTEGER,
      DATE,
      TEXT,
    } = Sequelize;
    return await queryInterface.createTable('notice', {
      id: {
        type: INTEGER,
        allowNull: false,
        primaryKey: true,
        autoIncrement: true,
        comment: '序号',
      },
      notice: {
        type: TEXT,
        comment: '公告内容',
      },
      createdDate: {
        type: DATE,
        comment: '创建时间',
      },
    });
  },

  down: async queryInterface => {
    return await queryInterface.dropTable('notice');
  },
};
